package org.jeecg.modules.mes.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 任务参与者表
 * @Author: jeecg-boot
 * @Date: 2025-08-30
 * @Version: V2.0
 */
@Data
@TableName("mes_task_participant")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="mes_task_participant对象", description="任务参与者表")
public class MesTaskParticipant implements Serializable {
    private static final long serialVersionUID = 1L;

    /**主键ID*/
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键ID")
    private String id;

    /**任务ID*/
    @Excel(name = "任务ID", width = 15)
    @ApiModelProperty(value = "任务ID")
    private String taskId;

    /**员工ID*/
    @Excel(name = "员工ID", width = 15)
    @ApiModelProperty(value = "员工ID")
    private String employeeId;

    /**员工姓名*/
    @Excel(name = "员工姓名", width = 15)
    @ApiModelProperty(value = "员工姓名")
    private String employeeName;

    /**员工编号*/
    @Excel(name = "员工编号", width = 15)
    @ApiModelProperty(value = "员工编号")
    private String employeeNo;

    /**参与比例(%)*/
    @Excel(name = "参与比例", width = 15)
    @ApiModelProperty(value = "参与比例(%)")
    private BigDecimal participationRatio;

    /**领取数量*/
    @Excel(name = "领取数量", width = 15)
    @ApiModelProperty(value = "领取数量")
    private Integer claimedQuantity;

    /**完成数量*/
    @Excel(name = "完成数量", width = 15)
    @ApiModelProperty(value = "完成数量")
    private Integer completedQuantity;

    /**领取时间*/
    @Excel(name = "领取时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "领取时间")
    private Date claimedTime;

    /**开始时间*/
    @Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开始时间")
    private Date startTime;

    /**结束时间*/
    @Excel(name = "结束时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "结束时间")
    private Date endTime;

    /**实际工时*/
    @Excel(name = "实际工时", width = 15)
    @ApiModelProperty(value = "实际工时")
    private BigDecimal actualHours;

    /**质量评分*/
    @Excel(name = "质量评分", width = 15)
    @ApiModelProperty(value = "质量评分")
    private BigDecimal qualityScore;

    /**效率评分*/
    @Excel(name = "效率评分", width = 15)
    @ApiModelProperty(value = "效率评分")
    private BigDecimal efficiencyScore;

    /**参与状态(0-已领取,1-进行中,2-已完成,3-已暂停)*/
    @Excel(name = "参与状态", width = 15, dicCode = "participant_status")
    @Dict(dicCode = "participant_status")
    @ApiModelProperty(value = "参与状态(0-已领取,1-进行中,2-已完成,3-已暂停)")
    private Integer status;

    /**备注*/
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;

    /**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;

    /**创建时间*/
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;

    /**更新时间*/
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    /**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;

    /**租户ID*/
    @ApiModelProperty(value = "租户ID")
    private Integer tenantId;

    private transient String orderNo;

    private transient String productInfo;

    private transient String customerName;

    private transient BigDecimal unitPrice;

    private transient String workTypeName;
}
